<template>
	<view class="content">
		<mList :listData="listData" />
		<cmd-bottom-nav @click="tapNav" border-color="#BC1BBE" background-color="#BC1BBE" font-color="#fff" active-font-color="#fff"></cmd-bottom-nav>
	</view>
</template>

<script>
import cmdBottomNav from '@/components/cmd-bottom-nav/cmd-bottom-nav.vue';
import mList from '@/components/m-list/m-list.vue';
import comm from '../../common/helpers.js';
export default {
	components: { cmdBottomNav, mList },
	data() {
		return {
			listData: []
		};
	},
	onLoad() {
		uni.request({
			url: comm.websiteUrl + '?s=v1/gethelp/',
			method: 'GET',
			data: {},
			success: res => {
				// console.log(res);
				this.listData = res.data.data;
			},
			fail: () => {},
			complete: () => {}
		});
	},
	methods: {
		tapNav(e) {
			let that = this;
			let path = e.item.pagePath;
			uni.switchTab({
				url: path,
				success: res => {
					clearInterval(that.timer);
				},
				complete: com => {}
			});
		}
	}
};
</script>

<style lang="scss">
.content {
	width: 100%;
	height: 100%;
	position: absolute;
	padding: 0upx;
	overflow-y: scroll;
	background-image: url('https://zhanbu.nomeis.cn/upload/page_resource/bg3.png');
	background-size: 100% 95%;

	._bg {
		width: 100%;
		height: 100%;
		vertical-align: top;
		top: 0;
		right: 0;
		position: absolute;
		vertical-align: middle;
	}
}
</style>
